package com.caijinbang.study.entity;


import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;


/**
 * elasticsearch实体注解,加上了@Document注解之后，默认情况下这个实体中所有的属性都会被建立索引、并且分词
 *
 * @author caijb
 * @version 1.0.0
 * @date 2018-06-05 13:16
 */
@Document(indexName = "product", type = "book")
@Data
@AllArgsConstructor
@NoArgsConstructor
@Slf4j
public class Book {

    @Id
    private Long id;
    private String name;
    private String introduction;
    private Integer type;
}
